package com.wxp.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.validator.constraints.Length;

@Entity
@Table(name = "t_resource")
public class Resource {
	
	public Resource(){}
	
	public Resource(String operator,String module,String permission,String url,String operatorName,String operatorType,String parentOperator){
		this.operator = operator;
		this.module = module;
		this.permission = permission;
		this.url=url;
		this.operatorName = operatorName;
		this.operatorType = operatorType;
		this.parentOperator = parentOperator;
	}
	
	
	@Id
	@Length(max=64)
	@Column(name="OPERATOR_" ,nullable = true ,unique = false ,insertable = true ,updatable = true,length=64)
	private String operator;
	
	@Length(max=64)
	@Column(name="MODULE_" ,nullable = true ,unique = false ,insertable = true ,updatable = true,length=64)
	private String module;
	
	@Length(max=512)
	@Column(name="PERMISSION_" ,nullable = true ,unique = false ,insertable = true ,updatable = true,length=512)
	private String permission;
	
	@Length(max=64)
	@Column(name="URL_" ,nullable = true ,unique = false ,insertable = true ,updatable = true,length=64)
	private String url;
	
	@Length(max=64)
	@Column(name="OPERATOR_NAME_" ,nullable = true ,unique = false ,insertable = true ,updatable = true,length=64)
	private String operatorName;
	
	@Length(max=64)
	@Column(name="OPERATOR_TYPE_" ,nullable = true ,unique = false ,insertable = true ,updatable = true,length=64)
	private String operatorType;
	
	
	
	@Length(max=64)
	@Column(name="PARENT_OPERATOR_" ,nullable = true ,unique = false ,insertable = true ,updatable = true,length=64)
	private String parentOperator;



	public String getOperator() {
		return operator;
	}



	public void setOperator(String operator) {
		this.operator = operator;
	}



	public String getModule() {
		return module;
	}



	public void setModule(String module) {
		this.module = module;
	}



	public String getPermission() {
		return permission;
	}



	public void setPermission(String permission) {
		this.permission = permission;
	}



	public String getUrl() {
		return url;
	}



	public void setUrl(String url) {
		this.url = url;
	}



	public String getOperatorName() {
		return operatorName;
	}



	public void setOperatorName(String operatorName) {
		this.operatorName = operatorName;
	}


	public String getOperatorType() {
		return operatorType;
	}

	public void setOperatorType(String operatorType) {
		this.operatorType = operatorType;
	}

	public String getParentOperator() {
		return parentOperator;
	}



	public void setParentOperator(String parentOperator) {
		this.parentOperator = parentOperator;
	}
	
	
	

}
